package com.lucker.ds.model;

/**
 * cai_piao_simulation_code
 * @author 
 */
public class CaiPiaoSimulationCode extends BaseValueObject {
    private Long id;

    /**
     * 方案ID
     */
    private Long planId;

    /**
     * 玩法ID
     */
    private Integer gameModeId;

    /**
     * 玩法名称
     */
    private String gameModeName;

    /**
     * 开奖号码1
     */
    private String betFristNum;

    /**
     * 开奖号码2
     */
    private String betSecondNum;

    /**
     * 开奖号码3
     */
    private String betThirdNum;

    /**
     * 排序  暂时不用
     */
    private Integer sort;

    private String customQuerySqlText = null;

    private String orderStr = null;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getPlanId() {
        return planId;
    }

    public void setPlanId(Long planId) {
        this.planId = planId;
    }

    public Integer getGameModeId() {
        return gameModeId;
    }

    public void setGameModeId(Integer gameModeId) {
        this.gameModeId = gameModeId;
    }

    public String getGameModeName() {
        return gameModeName;
    }

    public void setGameModeName(String gameModeName) {
        this.gameModeName = gameModeName;
    }

    public String getBetFristNum() {
        return betFristNum;
    }

    public void setBetFristNum(String betFristNum) {
        this.betFristNum = betFristNum;
    }

    public String getBetSecondNum() {
        return betSecondNum;
    }

    public void setBetSecondNum(String betSecondNum) {
        this.betSecondNum = betSecondNum;
    }

    public String getBetThirdNum() {
        return betThirdNum;
    }

    public void setBetThirdNum(String betThirdNum) {
        this.betThirdNum = betThirdNum;
    }

    public Integer getSort() {
        return sort;
    }

    public void setSort(Integer sort) {
        this.sort = sort;
    }

    public void setCustomQuerySqlText(String customQuerySqlText) {
        this.customQuerySqlText = customQuerySqlText;
    }

    public String getCustomQuerySqlText() {
        return customQuerySqlText;
    }

    public void orderById(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by id asc";
            }else{
                this.orderStr = this.orderStr + ",id asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by id desc";
            }else{
                this.orderStr = this.orderStr + ",id desc";
            }
        }
    }

    public void orderByPlanId(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by plan_id asc";
            }else{
                this.orderStr = this.orderStr + ",plan_id asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by plan_id desc";
            }else{
                this.orderStr = this.orderStr + ",plan_id desc";
            }
        }
    }

    public void orderByGameModeId(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by game_mode_id asc";
            }else{
                this.orderStr = this.orderStr + ",game_mode_id asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by game_mode_id desc";
            }else{
                this.orderStr = this.orderStr + ",game_mode_id desc";
            }
        }
    }

    public void orderByGameModeName(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by game_mode_name asc";
            }else{
                this.orderStr = this.orderStr + ",game_mode_name asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by game_mode_name desc";
            }else{
                this.orderStr = this.orderStr + ",game_mode_name desc";
            }
        }
    }

    public void orderByBetFristNum(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by bet_frist_num asc";
            }else{
                this.orderStr = this.orderStr + ",bet_frist_num asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by bet_frist_num desc";
            }else{
                this.orderStr = this.orderStr + ",bet_frist_num desc";
            }
        }
    }

    public void orderByBetSecondNum(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by bet_second_num asc";
            }else{
                this.orderStr = this.orderStr + ",bet_second_num asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by bet_second_num desc";
            }else{
                this.orderStr = this.orderStr + ",bet_second_num desc";
            }
        }
    }

    public void orderByBetThirdNum(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by bet_third_num asc";
            }else{
                this.orderStr = this.orderStr + ",bet_third_num asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by bet_third_num desc";
            }else{
                this.orderStr = this.orderStr + ",bet_third_num desc";
            }
        }
    }

    public void orderBySort(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by sort asc";
            }else{
                this.orderStr = this.orderStr + ",sort asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by sort desc";
            }else{
                this.orderStr = this.orderStr + ",sort desc";
            }
        }
    }
}